package com.flaskpy.web.eternity.core.api;/*-----------------------------------
 *
 * flaskpy官方专业代码Copy大师 Administrator
 * 在 2021/6/8 21:16 创建这伟大又永久
 * 没有bug的文件
 *
 *-----------------------------------/


 /**
 * @Author flaskpy-Administrator
 * @Date 2021/6/8 21:16
 * @Version 1.0
 */

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.flaskpy.web.eternity.core.constant.CommonConstant;
import lombok.Data;

@Data
public class ResponseData<T> {
    private String code;
    private T data;
    private String msg;
    public static<T> ResponseData ok(T data){
        ResponseData r=new ResponseData();
        r.setCode(CommonConstant.SUCESS_CODE);
        r.setMsg(CommonConstant.SUCESS_MSG);
        r.setData(data);
        return r;
    }
}
